package Interfaz;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Button;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.ScrolledComposite;


/**
 * CU005 - Modificar competencia deportiva
 * @author 
 */
public class CU005 {

	protected Shell shlNueva;
	private Text text;
	private Text text_1;
	private Text text_2;
	private Text text_3;
	private Text text_4;
	private Text text_5;

	/**
	 * Launch the application.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			CU005 window = new CU005();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		
		// Centrar ventana
		Monitor primary = display.getPrimaryMonitor();
		Rectangle bounds = primary.getBounds();
		Rectangle rect = shlNueva.getBounds();
		int x = bounds.x + (bounds.width - rect.width) / 2;
		int y = bounds.y + (bounds.height - rect.height) / 2;	    
		shlNueva.setLocation(x, y);
		
		Label lblNombreDeCompetencia = new Label(shlNueva, SWT.NONE);
		lblNombreDeCompetencia.setText("Nombre:");
		lblNombreDeCompetencia.setBounds(10, 23, 47, 15);
		
		text = new Text(shlNueva, SWT.BORDER);
		text.setBounds(63, 20, 219, 21);
		
		Combo combo = new Combo(shlNueva, SWT.READ_ONLY);
		combo.setItems(new String[] {"B\u00E1squetbol", "F\u00FAtbol", "Handbol", "Tenis"});
		combo.setBounds(61, 60, 128, 23);
		
		Label lblNewLabel = new Label(shlNueva, SWT.NONE);
		lblNewLabel.setBounds(10, 63, 45, 15);
		lblNewLabel.setText("Deporte:");
		
		Label lblModalidad = new Label(shlNueva, SWT.NONE);
		lblModalidad.setText("Modalidad:");
		lblModalidad.setBounds(10, 103, 60, 15);
		
		Combo combo_1 = new Combo(shlNueva, SWT.READ_ONLY);
		combo_1.setItems(new String[] {"Liga", "Eliminatoria Simple", "Eliminatoria Doble"});
		combo_1.setBounds(76, 100, 128, 23);
		
		Button button = new Button(shlNueva, SWT.NONE);
		button.setText("Cancelar");
		button.setBounds(341, 414, 108, 32);
		
		Button btnContinuar = new Button(shlNueva, SWT.NONE);
		btnContinuar.setText("Siguiente >>");
		btnContinuar.setBounds(209, 414, 108, 32);
		
		CTabFolder tabFolder_1 = new CTabFolder(shlNueva, SWT.BORDER);
		tabFolder_1.setBounds(10, 143, 450, 250);
		tabFolder_1.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
		
		CTabItem tbtmLugares = new CTabItem(tabFolder_1, SWT.NONE);
		tbtmLugares.setText("Lugares");
		
		ScrolledComposite scrolledComposite_1 = new ScrolledComposite(tabFolder_1, SWT.BORDER | SWT.V_SCROLL);
		scrolledComposite_1.setAlwaysShowScrollBars(true);
		scrolledComposite_1.setExpandHorizontal(true);
		tbtmLugares.setControl(scrolledComposite_1);
		scrolledComposite_1.setExpandVertical(true);
		
		Composite composite_1 = new Composite(scrolledComposite_1, SWT.NONE);
		
		Button btnCheckButton = new Button(composite_1, SWT.CHECK);
		btnCheckButton.setBounds(10, 36, 118, 16);
		btnCheckButton.setText("Club \"Don Pepito\"");
		
		Button btnEstadioUtnFrsf = new Button(composite_1, SWT.CHECK);
		btnEstadioUtnFrsf.setText("Estadio UTN FRSF");
		btnEstadioUtnFrsf.setBounds(10, 61, 118, 16);
		
		text_2 = new Text(composite_1, SWT.BORDER);
		text_2.setEnabled(false);
		text_2.setText("0");
		text_2.setBounds(198, 34, 42, 21);
		
		text_3 = new Text(composite_1, SWT.BORDER);
		text_3.setEnabled(false);
		text_3.setText("0");
		text_3.setBounds(198, 59, 42, 21);
		
		Label lblPartidos = new Label(composite_1, SWT.NONE);
		lblPartidos.setBounds(192, 10, 55, 15);
		lblPartidos.setText("PARTIDOS:");
		
		Button btnJockeyClub = new Button(composite_1, SWT.CHECK);
		btnJockeyClub.setText("Jockey Club");
		btnJockeyClub.setBounds(10, 86, 118, 16);
		
		text_4 = new Text(composite_1, SWT.BORDER);
		text_4.setEnabled(false);
		text_4.setText("0");
		text_4.setBounds(198, 84, 42, 21);
		
		Button btnClubelQuill = new Button(composite_1, SWT.CHECK);
		btnClubelQuill.setText("Club \"El Quill\u00E1\"");
		btnClubelQuill.setBounds(10, 111, 118, 16);
		
		text_5 = new Text(composite_1, SWT.BORDER);
		text_5.setText("0");
		text_5.setEnabled(false);
		text_5.setBounds(198, 109, 42, 21);
		scrolledComposite_1.setContent(composite_1);
		scrolledComposite_1.setMinSize(composite_1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		
		CTabItem tbtmReglamento_1 = new CTabItem(tabFolder_1, SWT.NONE);
		tbtmReglamento_1.setText("Reglamento");
		
		ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder_1, SWT.BORDER);
		tbtmReglamento_1.setControl(scrolledComposite);
		scrolledComposite.setExpandHorizontal(true);
		scrolledComposite.setExpandVertical(true);
		
		Composite composite = new Composite(scrolledComposite, SWT.NONE);
		
		text_1 = new Text(composite, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
		text_1.setBounds(7, 45, 425, 166);
		
		Button button_1 = new Button(composite, SWT.NONE);
		button_1.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/square_shape_icon&16.png"));
		button_1.setBounds(250, 10, 26, 26);
		
		Button button_2 = new Button(composite, SWT.NONE);
		button_2.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/align_right_icon&16.png"));
		button_2.setBounds(218, 10, 26, 26);
		
		Button button_3 = new Button(composite, SWT.NONE);
		button_3.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/align_center_icon&16.png"));
		button_3.setBounds(186, 10, 26, 26);
		
		Button button_4 = new Button(composite, SWT.NONE);
		button_4.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/align_left_icon&16.png"));
		button_4.setBounds(154, 10, 26, 26);
		
		Button button_5 = new Button(composite, SWT.NONE);
		button_5.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/font_underline_icon&16.png"));
		button_5.setBounds(122, 10, 26, 26);
		
		Button button_6 = new Button(composite, SWT.NONE);
		button_6.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/font_italic_icon&16.png"));
		button_6.setBounds(90, 10, 26, 26);
		
		Button button_7 = new Button(composite, SWT.NONE);
		button_7.setImage(SWTResourceManager.getImage(CU005.class, "/Interfaz/Images/font_bold_icon&16.png"));
		button_7.setBounds(58, 10, 26, 26);
		
		Combo combo_3 = new Combo(composite, SWT.READ_ONLY);
		combo_3.setItems(new String[] {"8", "9", "10", "11", "12", "14", "16"});
		combo_3.setBounds(10, 11, 42, 23);
		combo_3.select(4);
		scrolledComposite.setContent(composite);
		scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		
		shlNueva.open();
		shlNueva.layout();
		while (!shlNueva.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shlNueva = new Shell(SWT.CLOSE | SWT.TITLE | SWT.MIN);
		shlNueva.setSize(476, 490);
		shlNueva.setText("Editar competencia");

	}
}
